package com.guochenglang.www.util;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;

/**
 * @author GuoChenglang
 */
public class RequestReCodeUtil {
    public static void reCode(ServletRequest servletRequest, ServletResponse servletResponse) throws UnsupportedEncodingException {
        servletRequest.setCharacterEncoding("utf-8");
        servletResponse.setContentType("text/html;charset=utf-8");
    }
}
